home *** CD-ROM | disk | FTP | other *** search
- TPCLOCK
- -------
-
- TPClock is a unit that sits on top of TPCRT and allows display of
- an on screen clock during program execution. TPClock provides
- replacements for <ReadKeyWord>, <KeyPressed>, <ReadKey>, and the
- <CheckKbd> functions. Each replacement calls the procedure <ShowClock>
- then executes the corresponding routine in TPCRT. The <ShowClock>
- procedure is also exported for use in loops that are not
- dependent on keyboard input. The following constants and variables
- are also exported.
-
- Const
- ClockEnabled : boolean = False;
- CalendarEnabled : boolean = False;
-
- TPClock will not display on screen by default, one or both of
- these constants should be set to true for the clock display to be
- activated.
-
- ClockTimeMask : String[20] = 'HH:mm:ss te';
- ClockDateMask : String[20] = 'MM/dd/yy';
- ClockSepStr : String[20] = ' ';
-
- TPClock displays the date first followed by the constant
- ClockSepStr followed by the time. ClockTimeMask & ClockDateMask
- determine the format of the time and date on the screen.
-
- ClockY : byte = 1;
- ClockX : byte = 59;
-
- These are the coordinates where the first character of the date
- will display. If <CalanderEnabled> is false, the time will NOT
- be shifted right to fill in this area. The time will always be
- displayed at ClockY, ClockX + Length(ClockDateMask) +
- Length(ClockSepStr).
-
- Var
- ClockAttr : byte;
-
- The attribute in which to display the time/date string. Defaults
- to the value of <TextAttr> at initialization (program startup).
-
- A conditional define (UseClock) to include the TPClock unit should be
- added to the TPDEFINE.INC file. And TPClock should be added to the Uses
- statement of TPMenu, TPPick, TPEdit and TPEntry in the following
- manner:
-
- {$IFDEF UseClock}
- TPClock,
- {$ENDIF}
-
-